<%@ Control Language="C#" ClassName="ShowItemPicture" %>

<script runat="server" type="text/C#">
	public object BatchID { set { txtShow.OnClientClick = txtShow.OnClientClick.Replace("()","("+ value+")"); lnk.HRef += value; } }
	public object Visible{ set { lnk.Visible = value == DBNull.Value ? false : Convert.ToBoolean(value); } }
	protected override void OnLoad(EventArgs e) {
		base.OnLoad(e);
		
	}
</script>
<a runAt="server" id="lnk" target="ITEM_PICTURE"
	 onclick="event.cancelBubble=true" href='/customer/ShowItemPicture.aspx?ItemID='>Picture</a>
<asp:Button id="txtShow" Text="Upload"
     OnClientClick="event.cancelBubble=true;showUploadItemPicture();return false;"
     style="width:1px;overflow-x:visible" runat="server" />
<script>
function showUploadItemPicture(itemID){
	//open("http://boris_2007/Admin/item/Item_LoadPicture.aspx?iid="+itemID);
	showModelessDialog("/Admin/item/Item_LoadPicture.aspx?iid="+itemID,{cb:onPictureClose},dialogParams(300,100).join(";"));
}
function onPictureClose(){
	setTimeout(function(){btnRefresh().click()},500);
}
</script>